function throttle(fn, delay) {
  let prevTime = 0;
  function _throttle(...args) {
    let curTime = new Date().getTime();
    let interval = curTime - prevTime;
    if (interval >= delay) {
      fn.apply(this, args);
      prevTime = curTime;
    }
  }
  return _throttle;
}

function throttle(fn, delay) {
  let prevTime = 0;
  function _throttle(...args) {
    let curTime = new Date().getTime();
    let interval = curTime - prevTime;
    if (interval >= delay) {
      fn.apply(this, args);
      prevTime = curTime;
    }
  }
  return _throttle;
}

function throttle(fn, delay) {
  let prevTime = 0;
  function _throttle(...args) {
    let curTime = new Date().getTime();
    let interval = curTime - prevTime;
    if (interval >= delay) {
      fn.apply(this, args);
      prevTime = curTime;
    }
  }
  return _throttle;
}

function throttle(fn, delay) {
  let prevTime = 0;
  function _throttle(...args) {
    let curTime = new Date().getTime();
    let interval = curTime - prevTime;
    if (interval >= delay) {
      fn.apply(this, args);
      prevTime = curTime;
    }
  }
  return _throttle;
}

function throttle(fn, delay) {
  let prevTime = 0;
  function _throttle(...args) {
    let newTime = new Date().getTime();
    let interval = newTime - prevTime;
    if (interval >= delay) {
      fn.apply(this, args);
      prevTime = newTime;
    }
  }
  return _throttle;
}
